package com.oreilly.ez.account;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.stream.IntStream;
import java.util.stream.Stream;

public class RandomClient {

    public static void main(String[] args) {


//        for (int i = 0; i < 1000; i++) {
//            //生成6位随机数字
//            System.out.println((int)((Math.random()*9+1)*100000));
//        }

        IntStream.rangeClosed(0, 1000000).forEach(i -> {
            System.out.println(dateStr() + ramdom6());
        });


    }



    public static String dateStr(){

        return new SimpleDateFormat("yyyyMMdd-HH:mi:ss").format(new Date());
    }

    public static String ramdom6(){
        return String.valueOf((int) ((Math.random() * 9 + 1) * 100000));
    }
}
